﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using com.tiyma.components;
using com.tiyma.common;
using System.Text.RegularExpressions;

namespace com.tiyma.web
{
    public partial class SEOChapter : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
          
        }

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            string t_key = txtChapterName.Text.Trim();

            t_key = DESEncryptBYTriple.Encrypt(t_key);

            ChapterContentManager t_chapter_mgr = new ChapterContentManager();

            try
            {
                string t_chapter_content = t_chapter_mgr.SEOChapter(t_key);

                t_chapter_content = t_chapter_content.Replace("#", "\"");
                t_chapter_content = t_chapter_content.Replace("@", "'");

                lblResult.Text = t_chapter_content;
            }
            catch (Exception ex)
            {
                LogHelper.Error("搜索小说章节内容失败" + ex.ToString());
            }

        }

        protected void btn_normal_search_Click(object sender, EventArgs e)
        {
            string t_key = txtChapterName.Text.Trim();

            t_key = DESEncryptBYTriple.Encrypt(t_key);

            ChapterContentManager t_chapter_mgr = new ChapterContentManager();

            try
            {
                string t_chapter_content = t_chapter_mgr.SEONChapter(t_key);

                t_chapter_content = t_chapter_content.Replace("#", "\"");
                t_chapter_content = t_chapter_content.Replace("@", "'");

                lblResult.Text = t_chapter_content;
            }
            catch (Exception ex)
            {
                LogHelper.Error("搜索小说章节内容失败" + ex.ToString());
            }
        }
    }
}
